[logic]
active = ph_door@closed

[ph_door@closed]
closed = true
locked = false
on_use = ph_door@open %+jup_b41_inner_door_open%
on_info2 = {+jup_b41_outer_door_open} ph_door@locked %-jup_b41_inner_door_open%
snd_open_start = trader_door_open_start
snd_close_start = trader_door_close_start
snd_close_stop = trader_door_close_stop

[ph_door@open]
closed = false
locked = false
on_use = ph_door@closed  %-jup_b41_inner_door_open%
on_info2 = {!surge_started +jup_b41_outer_door_open} ph_door@locked %-jup_b41_inner_door_open%
snd_open_start = trader_door_open_start
snd_close_start = trader_door_close_start
snd_close_stop = trader_door_close_stop
on_game_timer = 40 | ph_door@closed  %-jup_b41_inner_door_open%

[ph_door@locked]
closed = true
locked = true
unlock_for_npc = true
on_info = {-jup_b41_outer_door_open} ph_door@closed
on_game_timer = 40 | ph_door@closed
snd_open_start = trader_door_locked
tip_open = st_jup_b41_door_locked

[ph_door@locked_alarm]
closed = true
locked = true
unlock_for_npc = true
snd_open_start = trader_door_locked
tip_open = tip_door_closed_hide_weapon

[ph_door@locked_base_alarm]
closed = true
locked = true
unlock_for_npc = true
snd_open_start = trader_door_locked
tip_open = tip_door_closed_base_alarm

[ph_door@surge]
closed = false
locked = false
snd_open_start = trader_door_open_start
snd_close_start = trader_door_close_start
snd_close_stop = trader_door_close_stop
